home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / batchut / when11.zip / WHENISIT.DOC < prev    next >
Text File  |  1992-01-05  |  9KB  |  245 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.         
  8.         WHENISIT 1.1                                                    |
  9.         A Batch File Utility to Tell Time
  10.         Copyright 1991,1992 by Chuck Steenburgh                         |
  11.         
  12.            WHENISIT is a highly flexible utility to provide control in
  13.         DOS batch files based on time and date.  With its many op-
  14.         tions, WHENISIT will allow your batch files to determine the
  15.         year, month, date, day of the week, hour, minute, second, or
  16.         whether it is morning or afternoon and make intelligent de-
  17.         cisions based on this information.  WHENISIT is also able to    |
  18.         perform actions once a day (such as at the first boot-up of the |
  19.         day).                                                           |
  20.         
  21.            For example, you may want certain actions performed at
  22.         boot time on certain days of the week or month.  Adding
  23.         WHENISIT to your AUTOEXEC.BAT file can allow you to make
  24.         these sort of decisons. (Or allow your computer to make them
  25.         for you automatically.)
  26.         
  27.         Usage:
  28.         
  29.                      WHENISIT [option]
  30.                   
  31.                   where [option] is one of the following:
  32.                   
  33.                   /?              Displays help screen                  |
  34.                      
  35.                   /a              Returns errorlevel based on am or pm
  36.                   
  37.                   /d              Returns errorlevel equal to date
  38.                   
  39.                   /h              Returns errorlevel equal to the hour
  40.                                   (24-hour clock)
  41.                               
  42.                   /m              Returns errorlevel equal to month
  43.                   
  44.                   /mi             Returns errorlevel equal to minute
  45.                   
  46.                   /s              Returns errorlevel equal to second
  47.                   
  48.                   /w              Returns errorlevel based on the day
  49.                                   of the week
  50.                                   
  51.                   /y              Returns errorlevel equal to the last
  52.                                   two digits of the year.
  53.                                   
  54.            Entering WHENISIT alone on the command line will generate an |
  55.         errorlevel of 1 if WHENISIT has not been executed yet that day. |
  56.         Otherwise, an errorlevel of 0 will be returned.  Note that if   |
  57.         you maintain multiple copies of WHENISIT.EXE on your system,    |
  58.         each copy of WHENISIT will keep track of whether or not it has  |
  59.         run separately from any other copies.  Be sure you know which   |
  60.         copy you are executing!  This is useful to put in AUTOEXEC.BAT  |
  61.  
  62.                                      Page 1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.         to indicate actions you want performed only ONCE each day, no   |
  69.         matter how many times you re-boot your computer.  (Once-a-day   |
  70.         mode)                                                           |
  71.                                   
  72.         Examples:
  73.         
  74.              WHENISIT /a          Returns errorlevel of 2 if it is pm,
  75.                                   or 1 if it is am.
  76.                                   
  77.              WHENISIT /y          If your clock is set to the year
  78.                                   1991, returns an errorlevel of 91.
  79.                                   
  80.              WHENISIT /w          If your clock indicates that it is
  81.                                   Tuesday, returns an errorlevel of 3.
  82.              
  83.              WHENISIT             Returns errorlevel of 0 if WHENISIT   |
  84.                                   has already executed, 1 if not.       |
  85.                                   
  86.         Errorlevel Chart:
  87.         
  88.              Errorlevel  Switch:  /a            /m            /d
  89.              ----------         --------------------------------------
  90.                  1                AM        January         Sunday
  91.                  2                PM        February        Monday
  92.                  3                na        March           Tuesday
  93.                  4                na        April           Wednesday
  94.                  5                na        May             Thursday
  95.                  6                na        June            Friday
  96.                  7                na        July            Saturday
  97.                  8                na        August             na
  98.                  9                na        September          na
  99.                 10                na        October            na
  100.                 11                na        November           na
  101.                 12                na        December           na
  102.                 
  103.            The errorlevels returned through the use of other switches
  104.         should be self-explanatory.  If an error occurs, the an error-
  105.         level of 0 will be returned.
  106.         
  107.         
  108.         DISCLAIMER
  109.         
  110.            The programs described in this documentation are guaran-
  111.         teed to do absolutely nothing!  They have, however, in my exper-
  112.         ience performed essentially as described herein.  The author
  113.         will not be responsible for any loss or damages caused through
  114.         the use of these programs.
  115.         
  116.            All trademarks are property of their respective owners.
  117.         
  118.            The programs and documentation are Copyright 1991,1992 by 
  119.         Chuck Steenburgh.  You are encouraged to distribute these pro-
  120.         grams provided the following conditions are met:
  121.         
  122.  
  123.                                      Page 2
  124.  
  125.  
  126.  
  127.  
  128.  
  129.            - all files contained in the archive or distribution disk
  130.              must be distributed together in UNMODIFIED form
  131.         
  132.            - you charge no more than a reasonable fee for copying or
  133.              subscription, and clearly indicate that payment of such
  134.              a fee does NOT grant ownership of the programs.
  135.         
  136.            This program is part of set of utilities known as STEEN-
  137.         BURGH'S STUFF (Mildly Useful Utilities).  The full set of
  138.         utilities includes the following programs:
  139.         
  140.              BATBOX:     Simple menu creation/input system
  141.              CLK:        Displays time on screen
  142.              DOSVER:     Checks for DOS version currently running
  143.              FREEDISK:   Checks for available disk space
  144.              HOWMUCH:    Displays space occupied by a group of files
  145.              INPUT:      Simple prompt/input system
  146.              KLS:        Colorful screen-clearing utility
  147.              LAUNCHER:   File selection/execution system
  148.              MUSIC:      Plays transcribed sheet music on the PC
  149.              RAND:       Random number generator
  150.              SKIP:       Prints blank lines from batch files
  151.              SOUNDER:    Wide range of noise making options
  152.              WAITFOR:    Timed pauses 
  153.              WHENISIT:   Date/time telling utility
  154.              WRITE:      Colorful output anywhere on screen
  155.              XD:         Create/switch directories at the same time
  156.         
  157.            Payment of the $10 registration fee automatically registers
  158.         you for the full set.
  159.         
  160.            You may evaluate these programs for up to 30 days on a free
  161.         trial basis.  After 30 days, you should register your use of
  162.         these programs.  The registration fee is $10, payable to the
  163.         author at the address given below.
  164.         
  165.            Let's be real: I don't plan to make alot of money this way.
  166.         Registration does have its advantages:
  167.         
  168.            - I am improving these programs all the time.  Registration
  169.              will get you IMMEDIATELY a disk with the latest version,
  170.              which includes a version of BATBOX with user-selected 
  171.              menu colors.  When Version 2.0 of these utilities is re-
  172.              leased, you will also receive that free of charge.
  173.         
  174.            - While I can't promise to include e